<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title> 无缝连续滚动特效</title>
    <style>
        img {
            width: 100px;
            height: 100px;
        }

        ul {
            position: relative;
            list-style: none;
            width: 100000px;
        }

        * {
            margin: 0;
            padding: 0;
        }

        div {
            width: 500px;
            height: 100px;
            border: 1px solid black;
            margin: 50px auto;
            overflow: hidden;
        }

        li {
            background-color: red;
            float: left;
            width: 100px;
            height: 100px;
            text-align: center;
            line-height: 100px;
            margin-right: 10px;
            font-size: 50px;
        }
    </style>
</head>

<body>
    <div id="box">
       <a href="www.shuaige.com.html"> <ul id="la">
            <li>大</li>
            <li>帅</li>
            <li>哥</li>
            <li><img src="image/pan.jpg" alt=""title="帅哥一枚"></li>
            <li>在</li>
            <li>此</li>
        </ul></a>
    </div>
    <script>
        var box = document.getElementById('box');
        var la = document.getElementById('la');
        la.innerHTML += la.innerHTML;
        var l = 0; var timer;
        function fun() {
            clearInterval(timer);
            timer = setInterval(function () {

                l -= 2;
                la.style.left = l + 'px';
                if (l <= -660) {
                    l = 0;
                }
            }, 20);
        }
        fun();
        box.onmousemove = function () {
            clearInterval(timer);
        }
        box.onmouseleave = function () {
            fun();

        }
    </script>
</body>

</html>